<?php
namespace app\admin\controller;
use \think\facade\View;
use \think\facade\Request;
use \think\facade\Db;
class Order{
    public function orderList()
    {
        //接POST数据所有的值
        $post=Request::post();
        //批量赋值 可以按键输出 进行留置
        view::assign($post);
        //拼装搜索条件
        $where=[];
        if(isset($post['keywords'])&& $post['keywords']<> '')     $where['o.order_sn']=$post['keywords'];
        if(isset($post['k_time']) && !empty($post['k_time']))     $where['k_time']=$post['k_time'];
        if(isset($post['j_time']) && !empty($post['j_time']))     $where['j_time']=$post['j_time'];
        if(isset($post['d_price']) && !empty($post['d_price']))     $where['d_price']=$post['d_price'];
        if(isset($post['g_price']) && !empty($post['g_price']))     $where['g_price']=$post['g_price'];
        if(isset($post['status_a']) && count($post['status_a'])>=0) $where['status_a']=$post['status_a'];

        $order=\app\admin\model\Order::getOrder($where);

        View::assign('order',$order);
        $status=\app\admin\model\OrderStatus::getOrderStatus();
        View::assign('status',$status);
        return view('order_list');
    }


}